package com.project.mapper;

import com.project.bean.StudentBean;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

import java.util.List;

public interface IStudentMapper {
    @Insert("INSERT INTO t_student(s_name,s_birthday) values(#{name},#{birthday})")
    public void add(StudentBean student);
    @Delete("delete from t_student where pk_studentId = #{id}")
    public void del(int id);
    @Update("update t_student set s_birthday = #{newData} where pk_studentId = #{id}")
    public void update(@Param("id") int id,@Param("newData") String newData);
    public List<StudentBean> findAll();
}
